package com.anyfo.system.service;

import java.util.List;

import com.anyfo.system.AbstractModule;
import com.anyfo.system.AbstractUser;
import com.anyfo.system.Function;
import com.anyfo.system.Privilege;
import com.anyfo.system.User;

/**
 * 授权方面的服务
 * 
 * @author Cubehead
 * 
 */
public interface SecurityService {
	void addPrivilege(Privilege privilege);

	void removePrivilege(Privilege privilege);

	List<Function> getFuncitons(User user, AbstractModule module);

	boolean isPrivilege(String functionName, User user);

	/**
	 * 登陆
	 * 
	 * @param name
	 * @param passwd
	 * @return
	 */
	AbstractUser login(String name, String passwd);
}
